package com.program.cloudmanagesystem.login.controller;
import com.alibaba.nacos.api.annotation.NacosInjected;
import com.program.cloudmanagesystem.login.domain.User;
import com.program.cloudmanagesystem.login.service.UserService;
//import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

//import javax.jws.WebParam;
//import javax.jws.soap.SOAPBinding;


@RestController
@RefreshScope
@RequestMapping("/")

public class UserController {
    @NacosInjected
    @Autowired
    private UserService userService;

    @PostMapping ("/exist")
    public User searchHotel(@RequestBody User user){

        return userService.exist(user.getUserid());
    }

    @PostMapping("/signup")
    public void signup(@RequestBody User user){
        userService.signup(user);
    }
}